-
Notifications
You must be signed in to change notification settings - Fork 5
Fix/vanish #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix/vanish #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the vanish mode functionality and annotation sizing system to track line sizes per subtask rather than per annotation. It introduces a new keybind for toggling vanish mode across all subtasks, removes the deprecated default_annotation_size configuration, and fixes positioning issues with the toolbox collapse button.
Changes:
- Moved annotation line size tracking from individual annotations to per-subtask state
- Added
annotation_vanish_all_keybindconfiguration option with shift+v default - Removed
line_sizeproperty from annotation objects and deprecateddefault_annotation_sizeconfig - Fixed toolbox collapse button positioning to use absolute instead of fixed positioning
Reviewed changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/annotation.ts | Removed line_size parameter from ULabelAnnotation class |
| src/configuration.ts | Removed deprecated default_annotation_size, added annotation_vanish_all_keybind, changed default initial_line_size to 5 |
| src/index.js | Removed line_size initialization from annotations, moved to subtask state; updated get_scaled_line_size to use subtask line size |
| src/listeners.ts | Added keybind handlers for annotation resizing that call AnnotationResizeItem methods |
| src/subtask.ts | Added is_vanished and line_size properties to subtask state |
| src/toolbox.ts | Refactored AnnotationResizeItem to use static methods and track line size per subtask; removed cookie-based size storage; fixed collapse button positioning |
| src/toolbox_items/keybinds.ts | Added new "Toggle Vanish All" keybind entry and updated "Toggle Vanish" description |
| tests/annotation.test.js | Removed assertion checking line_size on annotation object |
| tests/e2e/keybind-functionality.spec.js | Updated vanish keybind test to check subtask state instead of annotation line_size |
| tests/testing-utils/init_utils.js | Added return of ulabel instance from wait_for_ulabel_init |
| tests/testing-utils/subtask_utils.js | Added get_current_subtask utility function |
| package.json | Bumped version to 0.22.1, added baseline-browser-mapping dependency |
| api_spec.md | Removed line_size from annotation spec, removed default_annotation_size documentation, updated initial_line_size default to 5 |
| CHANGELOG.md | Added 0.22.1 release notes with future date (Jan 13th, 2026) |
| demo files | Removed line_size properties from example annotations |
| .github/tasks.md | Updated tasks list |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix Vanish Mode
Description
annotation_vanish_all_keybindline_sizeproperty from the annotation object. Use the subtaskline_sizeinstead.default_annotation_sizeargument in the configuration object. Use theinitial_line_sizeargument instead. See api_spec.md for details.Implements some functionality I initially implemented as part of #153, however the rest of that PR is pretty obsolete. Closes #153.
PR Checklist
package.jsonhas been bumped since last releasepackage.jsonandsrc/version.jsnpm installandnpm run buildAFTER bumping the version numberapi_spec.md)changelog.mdBreaking API Changes
default_annotation_sizeargument in the configuration object. Use theinitial_line_sizeargument instead. See api_spec.md for details.line_sizeproperty from annotation objects.subtask.state.line_sizedetermined the size of drawn annotations within a subtask.